package com.ruoyi.owner.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.owner.domain.FzOwnerDetails;
import com.ruoyi.owner.mapper.FzOwnerDetailsMapper;
import com.ruoyi.owner.service.IFzOwnerDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-27
 */
@Service
public class FzOwnerDetailsServiceImpl implements IFzOwnerDetailsService
{
    @Autowired
    private FzOwnerDetailsMapper fzOwnerDetailsMapper;

    /**
     * 查询用户信息
     * 
     * @param id 用户信息ID
     * @return 用户信息
     */
    @Override
    public FzOwnerDetails selectFzOwnerDetailsById(Long id)
    {
        return fzOwnerDetailsMapper.selectFzOwnerDetailsById(id);
    }

    /**
     * 查询用户信息列表
     * 
     * @param fzOwnerDetails 用户信息
     * @return 用户信息
     */
    @Override
    public List<FzOwnerDetails> selectFzOwnerDetailsList(FzOwnerDetails fzOwnerDetails)
    {
        return fzOwnerDetailsMapper.selectFzOwnerDetailsList(fzOwnerDetails);
    }

    /**
     * 新增用户信息
     * 
     * @param fzOwnerDetails 用户信息
     * @return 结果
     */
    @Override
    public int insertFzOwnerDetails(FzOwnerDetails fzOwnerDetails)
    {
        fzOwnerDetails.setCreateTime(DateUtils.getNowDate());
        return fzOwnerDetailsMapper.insertFzOwnerDetails(fzOwnerDetails);
    }

    /**
     * 修改用户信息
     * 
     * @param fzOwnerDetails 用户信息
     * @return 结果
     */
    @Override
    public int updateFzOwnerDetails(FzOwnerDetails fzOwnerDetails)
    {
        fzOwnerDetails.setUpdateTime(DateUtils.getNowDate());
        return fzOwnerDetailsMapper.updateFzOwnerDetails(fzOwnerDetails);
    }

    /**
     * 删除用户信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzOwnerDetailsByIds(String ids)
    {
        return fzOwnerDetailsMapper.deleteFzOwnerDetailsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户信息信息
     * 
     * @param id 用户信息ID
     * @return 结果
     */
    @Override
    public int deleteFzOwnerDetailsById(Long id)
    {
        return fzOwnerDetailsMapper.deleteFzOwnerDetailsById(id);
    }
}
